{% extends "base.html" %}
{% block main %}
<table width="90%" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
	<tr class="board_header">
	    <td width="*" height="20" align="center" bgcolor="#5a7594">讨论区</td>
	    <td width="8%" align="center" bgcolor="#5a7594">帖子数</td>
	    <td width="8%" align="center" bgcolor="#5a7594">回复数</td>
	    <td width="15%" align="center" bgcolor="#5a7594">最后发表</td>
	    <td width="15%" align="center" bgcolor="#5a7594">版主</td>
	</tr>
    {% for b in boards %}
	<tr>
	    <td height="26" colspan="5" bgcolor="#d1d9e2"><b>{{b.board}}</b></td>
    </tr>
    {% for s in b.sub %}
	<tr bgcolor="#eeeeee" align="left" valign="top" class="board_item">
        <td>
            <p><a href="{% url bb.views.board s.slug %}">{{ s.slug }}</a></p>
            <p>{{ s.description }}</p>
        </td>
	    <td align="center" valign="middle" bgcolor="#eeeeee">{{ s.topics }}</td>
	    <td align="center" valign="middle" bgcolor="#eeeeee">{{ s.replies }}</td>
	    <td align="left" valign="top" bgcolor="#eeeeee">
		    <p>{{ s.last.created|date:"Y-m-d h:i" }}</p>
	        <p>In:<a href="{# url bb.views.topic s.last.id #}">{{ s.last.title }}</a></p>
	        <p>By:<a href="#">{{ s.last.author }}</a></p></td>
	    <td align="left" valign="middle" bgcolor="#eeeeee"><a href="#">weicongju</a>,<a href="#">baidu</a></td>
    </tr>
    {% endfor %}
    {% endfor %}
</table>
{% endblock %}
